//
//  Film.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Film.h"

@implementation Film

-(id)init
{

    _name = @"夏洛特烦恼";
    _part = 1;
    _actor = @"沈腾";
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %ld %@", _name, _part, _actor);

}

-(void)online
{

    NSLog(@"%@是一部由%@主演的%ld集连续剧", _name, _actor, _part);

}


- (NSString *)name
{
    return _name;
}

- (void)setName:(NSString *)name
{
    _name = name;
}
- (NSInteger)part
{
    return _part;
}
- (void)setPart:(NSInteger)part
{
    _part = part;
}
- (NSString *)actor
{
    return _actor;
}
- (void)setActor:(NSString *)actor
{
    _actor = actor;
}
-(id)initWithName:(NSString *)name part:(NSInteger)part actor:(NSString *)actor
{
    _name = name;
    _part = part;
    _actor = actor;
    return self;

}


+ (id)filmWithName:(NSString *)name part:(NSInteger)part actor:(NSString *)actor
{
    Film *f = [[Film alloc] initWithName:name part:part actor:actor];
    return f;
}





@end
